광고 단위 수정
광고 단위의 수정 가능한 필드를 변경합니다. code와 parent_id는 변경할 수 없습니다.
접근 제어:
Admin과 Operator 계정은 광고 단위 리소스에 전체 접근 권한(생성/조회/수정/삭제)을 가집니다.
Advertiser 계정은 이 엔드포인트에 접근할 수 없습니다 — 배정 대상 선택용 경량 조회 뷰는 GET /ad-units/targets를 참고하세요.
curl --request PATCH \
--url https://your_a2_service/api/manager/ad-units/{ad_unit_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "홈 화면 상단 배너 — 업데이트",
"name": "메인 배너 광고 (수정)"
}
'import requests
url = "https://your_a2_service/api/manager/ad-units/{ad_unit_id}"
payload = {
"description": "홈 화면 상단 배너 — 업데이트",
"name": "메인 배너 광고 (수정)"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '홈 화면 상단 배너 — 업데이트', name: '메인 배너 광고 (수정)'})
};
fetch('https://your_a2_service/api/manager/ad-units/{ad_unit_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/manager/ad-units/{ad_unit_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '홈 화면 상단 배너 — 업데이트',
'name' => '메인 배너 광고 (수정)'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/manager/ad-units/{ad_unit_id}"
payload := strings.NewReader("{\n \"description\": \"홈 화면 상단 배너 — 업데이트\",\n \"name\": \"메인 배너 광고 (수정)\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your_a2_service/api/manager/ad-units/{ad_unit_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"홈 화면 상단 배너 — 업데이트\",\n \"name\": \"메인 배너 광고 (수정)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/ad-units/{ad_unit_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"홈 화면 상단 배너 — 업데이트\",\n \"name\": \"메인 배너 광고 (수정)\"\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"ad_unit_sizes": [
{
"h": 1,
"w": 1
}
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 250,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 300
},
"ext": {
"algorithm": "axa0",
"approval_method": "admin",
"bcat": [],
"default_cpa": 0,
"default_cpc": 0,
"display": {
"enabled": 0
},
"external_raw_data": "<unknown>",
"implicit_app_inference": {
"android_bundle": "<string>",
"app_name": "<string>",
"cat": [
"<string>"
],
"ios_bundle": "<string>",
"ua_keywords": []
},
"metric_mode": "all",
"native": {
"enabled": 0,
"render_mode": "html"
},
"passback": "<unknown>",
"payout": "rates",
"public_url": "<string>",
"publisher": "<unknown>",
"recommendation": {
"enabled": 0
},
"responsive": "fixed",
"target_ecpm": 0,
"target_service": "<string>",
"video": {
"enabled": 0
}
},
"gpid": "<string>",
"instl": 0,
"is_active": true,
"native": {
"assets": []
},
"no": 123,
"recommendation": {
"ext": {},
"topn": 10
},
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"api": [
32767
],
"boxing": 1,
"clktype": 1,
"comp": [
{
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 123,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 123
},
"ext": null,
"id": "<string>",
"vcm": 123
}
],
"comptype": [
"Static"
],
"ctype": [
123
],
"delay": 0,
"delivery": [
"Streaming"
],
"expdir": [
"Left"
],
"ext": null,
"h": 300,
"linear": 0,
"maxbitr": 1,
"maxdur": 0,
"maxext": 0,
"maxseq": 1,
"mime": [
"<string>"
],
"minbitr": 1,
"mincpmpersec": 123,
"mindur": 0,
"overlayexpdir": [
"Left"
],
"playend": "OnVideoCompletion",
"playmethod": [
1
],
"poddur": 1,
"podid": 1,
"podseq": 0,
"pos": "Unknown",
"ptype": 1,
"rqddurs": [
1
],
"skip": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2,
"w": 480
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}인증
Bearer 인증. 액세스 토큰을 Authorization: Bearer <token> 헤더로 전달합니다.
경로 매개변수
본문
PATCH /ad-units/{id} 요청 본문.
code는 변경 불가 — 허용되지 않음.is_active는 /activate, /deactivate로 관리 — 허용되지 않음.partial_safe_update_only=True인 경우 안전한 필드만 적용됩니다: name, description, ext.target_ecpm, ext.default_cpa, ext.default_cpc, ext.bcat.
타게팅용 크기 메타데이터.
Show child attributes
Show child attributes
광고 단위 설명.
디스플레이 게재 위치 설정.
Show child attributes
Show child attributes
광고 단위 확장 필드.
Show child attributes
Show child attributes
OpenRTB imp.ext.gpid에 사용되는 표준 게재 위치 ID.
전면 광고 여부. 0 = 아니오, 1 = 예.
0, 1 광고 단위 표시 이름 (1-255자).
1 - 255네이티브 게재 위치 설정.
Show child attributes
Show child attributes
true이면 광고 단위가 게재 중일 때 안전하게 수정 가능한 필드만 적용합니다:
- 이름
- 설명
- 목표 eCPM
- 기본 CPA
- 기본 CPC
- 추천 설정
- 차단 광고주 카테고리
추천 설정.
Show child attributes
Show child attributes
이 광고 단위에 연결된 사이트 식별자.
비디오 게재 위치 설정.
Show child attributes
Show child attributes
응답
성공 응답
광고 단위 변경(생성/수정) 응답 스키마.
광고 단위 코드 식별자.
광고 단위를 생성한 사용자 ID.
광고 단위 ID (uuid7)
광고 단위 이름.
광고 단위의 계층 경로 (예: "parent_id/child_id").
타게팅 메타데이터 크기. 서빙·렌더링을 좌우하는 display/video.w/h와는 별개입니다.
Show child attributes
Show child attributes
광고 단위 설명.
디스플레이 게재 위치 설정.
Show child attributes
Show child attributes
광고 단위 확장 필드.
Show child attributes
Show child attributes
OpenRTB imp.ext.gpid에 사용되는 표준 지면 ID.
인터스티셜 지면 여부. 0 = 아니오, 1 = 예. 디스플레이·동영상·네이티브 전체에 적용됩니다.
0, 1 광고 단위 활성 여부.
네이티브 지면임을 나타내는 지면 서브타입 객체입니다. (AdCOM 표준이 아닌 OpenRTB Native Ads 1.2 Native Markup Request Object 기반)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
비디오 게재 위치 설정.
Show child attributes
Show child attributes
이 페이지가 도움이 되었나요?
curl --request PATCH \
--url https://your_a2_service/api/manager/ad-units/{ad_unit_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "홈 화면 상단 배너 — 업데이트",
"name": "메인 배너 광고 (수정)"
}
'import requests
url = "https://your_a2_service/api/manager/ad-units/{ad_unit_id}"
payload = {
"description": "홈 화면 상단 배너 — 업데이트",
"name": "메인 배너 광고 (수정)"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '홈 화면 상단 배너 — 업데이트', name: '메인 배너 광고 (수정)'})
};
fetch('https://your_a2_service/api/manager/ad-units/{ad_unit_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/manager/ad-units/{ad_unit_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '홈 화면 상단 배너 — 업데이트',
'name' => '메인 배너 광고 (수정)'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/manager/ad-units/{ad_unit_id}"
payload := strings.NewReader("{\n \"description\": \"홈 화면 상단 배너 — 업데이트\",\n \"name\": \"메인 배너 광고 (수정)\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your_a2_service/api/manager/ad-units/{ad_unit_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"홈 화면 상단 배너 — 업데이트\",\n \"name\": \"메인 배너 광고 (수정)\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/ad-units/{ad_unit_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"홈 화면 상단 배너 — 업데이트\",\n \"name\": \"메인 배너 광고 (수정)\"\n}"
response = http.request(request)
puts response.read_body{
"code": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"ad_unit_sizes": [
{
"h": 1,
"w": 1
}
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 250,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 300
},
"ext": {
"algorithm": "axa0",
"approval_method": "admin",
"bcat": [],
"default_cpa": 0,
"default_cpc": 0,
"display": {
"enabled": 0
},
"external_raw_data": "<unknown>",
"implicit_app_inference": {
"android_bundle": "<string>",
"app_name": "<string>",
"cat": [
"<string>"
],
"ios_bundle": "<string>",
"ua_keywords": []
},
"metric_mode": "all",
"native": {
"enabled": 0,
"render_mode": "html"
},
"passback": "<unknown>",
"payout": "rates",
"public_url": "<string>",
"publisher": "<unknown>",
"recommendation": {
"enabled": 0
},
"responsive": "fixed",
"target_ecpm": 0,
"target_service": "<string>",
"video": {
"enabled": 0
}
},
"gpid": "<string>",
"instl": 0,
"is_active": true,
"native": {
"assets": []
},
"no": 123,
"recommendation": {
"ext": {},
"topn": 10
},
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"api": [
32767
],
"boxing": 1,
"clktype": 1,
"comp": [
{
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 123,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 123
},
"ext": null,
"id": "<string>",
"vcm": 123
}
],
"comptype": [
"Static"
],
"ctype": [
123
],
"delay": 0,
"delivery": [
"Streaming"
],
"expdir": [
"Left"
],
"ext": null,
"h": 300,
"linear": 0,
"maxbitr": 1,
"maxdur": 0,
"maxext": 0,
"maxseq": 1,
"mime": [
"<string>"
],
"minbitr": 1,
"mincpmpersec": 123,
"mindur": 0,
"overlayexpdir": [
"Left"
],
"playend": "OnVideoCompletion",
"playmethod": [
1
],
"poddur": 1,
"podid": 1,
"podseq": 0,
"pos": "Unknown",
"ptype": 1,
"rqddurs": [
1
],
"skip": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2,
"w": 480
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}